from utils.yaml_utils import read_yaml


class Authorinfo():
    url="http://1.95.48.126:9090/user/getAuthorInfo?blogId="
    method="GET"

    def authorinfo_schema(self):
         return{
            "type": "object",
            "properties": {
                "code": {
                    "type": "string",
                    "enum": ["SUCCESS"]
                },
                "errMsg": {
                    "type": "string"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": "integer"
                        },
                        "userName": {
                            "type": "string"
                        },
                        "password": {
                            "type": "string"
                        },
                        "githubUrl": {
                            "type": "string",
                            "format": "uri"
                        },
                        "deleteFlag": {
                            "type": "integer",
                            "enum": [0, 1]
                        },
                        "createTime": {
                            "type": "string",
                            "format": "date-time"
                        },
                        "updateTime": {
                            "type": "string",
                            "format": "date-time"
                        }
                    },
                    "required": [
                        "id", "userName", "password", "githubUrl", "deleteFlag", "createTime", "updateTime"
                    ],
                    "additionalProperties": False
                }
            },
            "required": ["code", "errMsg", "data"],
            "additionalProperties": False
        }

authorinfo_paramenter=Authorinfo()